package com.itheima.myfile.test1;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class Demo3 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s = "中国";
        byte[] bytes1 = s.getBytes("UTF-8");
        byte[] bytes2 = s.getBytes("GBK");
        System.out.println(Arrays.toString(bytes1));
        System.out.println(Arrays.toString(bytes2));
    }
}
